﻿using System;
using System.Data;
using System.IO;
using System.Xml;
using System.Configuration;
using System.ComponentModel;
using System.Collections.Generic;

namespace GreatB2C.Config.SiteInfo
{
    public class ThumbnailConfig
    {
        #region 缩略图配置
        /// <summary>
        /// 缩略图默认宽度
        /// </summary>
        public static string ThumbsWidth
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "ThumbsWidth" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "ThumbsWidth" , value );
            }
        }

        /// <summary>
        /// 缩略图默认高度
        /// </summary>
        public static string ThumbsHeight
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "ThumbsHeight" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "ThumbsHeight" , value );
            }
        }

        /// <summary>
        /// 缩略图算法
        /// </summary>
        public static string ThumbsMode
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "ThumbsMode" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "ThumbsMode" , value );
            }
        }

        /// <summary>
        /// 缩略图底色
        /// </summary>
        public static string BgColor
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "BgColor" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "BgColor" , value );
            }
        }

        /// <summary>
        /// 水印类型
        /// </summary>
        public static string WaterMarkType
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkType" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkType" , value );
            }
        }

        /// <summary>
        /// WaterMarkType
        /// </summary>
        public static string WaterMarkText
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkText" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkText" , value );
            }
        }

        /// <summary>
        /// 文字字体
        /// </summary>
        public static string WaterMarkTextFoneType
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkTextFoneType" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkTextFoneType" , value );
            }
        }

        /// <summary>
        /// 字体样式
        /// </summary>
        public static string WaterMarkTextFoneStyle
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkTextFoneStyle" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkTextFoneStyle" , value );
            }
        }

        /// <summary>
        /// 文字大小
        /// </summary>
        public static string WaterMarkTextFoneSize
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkTextFoneSize" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkTextFoneSize" , value );
            }
        }

        /// <summary>
        /// 文字颜色
        /// </summary>
        public static string WaterMarkTextFoneColor
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkTextFoneColor" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkTextFoneColor" , value );
            }
        }

        /// <summary>
        /// 文字边框大小
        /// </summary>
        public static string WaterMarkTextFoneBorder
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkTextFoneBorder" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkTextFoneBorder" , value );
            }
        }

        /// <summary>
        /// 文字边框颜色
        /// </summary>
        public static string WaterMarkTextFoneBorderColor
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkTextFoneBorderColor" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkTextFoneBorderColor" , value );
            }
        }

        /// <summary>
        /// 坐标起点位置
        /// </summary>
        public static string WaterMarkTextPosition
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkTextPosition" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkTextPosition" , value );
            }
        }

        /// <summary>
        /// 坐标位置
        /// </summary>
        public static string WaterMarketTextPositionX
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarketTextPositionX" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarketTextPositionX" , value );
            }
        }
        public static string WaterMarketTextPositionY
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarketTextPositionY" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarketTextPositionY" , value );
            }
        }

        /// <summary>
        /// 水印图片文件名
        /// </summary>
        public static string WaterMarkImagePath
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkImagePath" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkImagePath" , value );
            }
        }

        /// <summary>
        /// 水印图片缩小比例
        /// </summary>
        public static string WaterMarkPercent
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkPercent" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkPercent" , value );
            }
        }
        public static string WaterMarkCompute
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkCompute" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkCompute" , value );
            }
        }
        public static string WaterMarkThumbPercent
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkThumbPercent" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkThumbPercent" , value );
            }
        }

        /// <summary>
        /// 水印图片透明度
        /// </summary>
        public static string Transparence
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "Transparence" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "Transparence" , value );
            }
        }

        /// <summary>
        /// 坐标起点位置
        /// </summary>
        public static string WaterMarkImagePosition
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkImagePosition" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkImagePosition" , value );
            }
        }

        /// <summary>
        /// 坐标位置
        /// </summary>
        public static string WaterMarkImagePositionX
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkImagePositionX" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkImagePositionX" , value );
            }
        }
        public static string WaterMarkImagePositionY
        {
            get
            {
                return BaseConfig.GetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkImagePositionY" );
            }
            set
            {
                BaseConfig.SetConfigValue( BaseConfig.eConfigs.Thumbnail , "WaterMarkImagePositionY" , value );
            }
        }

        public static bool Config( string ThumbsWidth , string ThumbsHeight , string ThumbsMode , string BgColor
            , string WaterMarkType , string WaterMarkText , string WaterMarkTextFoneType , string WaterMarkTextFoneStyle
            , string WaterMarkTextFoneSize , string WaterMarkTextFoneColor , string WaterMarkTextFoneBorder , string WaterMarkTextFoneBorderColor
            , string WaterMarkTextPosition , string WaterMarketTextPositionX , string WaterMarketTextPositionY , string WaterMarkImagePath
            , string WaterMarkPercent , string WaterMarkCompute , string WaterMarkThumbPercent , string Transparence
            , string WaterMarkImagePosition , string WaterMarkImagePositionX , string WaterMarkImagePositionY )
        {
            Dictionary<string , string> dicts = new Dictionary<string , string>( );

            dicts.Add( "ThumbsWidth" , ThumbsWidth );
            dicts.Add( "ThumbsHeight" , ThumbsHeight );
            dicts.Add( "ThumbsMode" , ThumbsMode );
            dicts.Add( "BgColor" , BgColor );
            dicts.Add( "WaterMarkType" , WaterMarkType );
            dicts.Add( "WaterMarkText" , WaterMarkText );
            dicts.Add( "WaterMarkTextFoneType" , WaterMarkTextFoneType );
            dicts.Add( "WaterMarkTextFoneStyle" , WaterMarkTextFoneStyle );
            dicts.Add( "WaterMarkTextFoneSize" , WaterMarkTextFoneSize );
            dicts.Add( "WaterMarkTextFoneColor" , WaterMarkTextFoneColor );
            dicts.Add( "WaterMarkTextFoneBorder" , WaterMarkTextFoneBorder );
            dicts.Add( "WaterMarkTextFoneBorderColor" , WaterMarkTextFoneBorderColor );
            dicts.Add( "WaterMarkTextPosition" , WaterMarkTextPosition );
            dicts.Add( "WaterMarketTextPositionX" , WaterMarketTextPositionX );
            dicts.Add( "WaterMarketTextPositionY" , WaterMarketTextPositionY );
            dicts.Add( "WaterMarkImagePath" , WaterMarkImagePath );
            dicts.Add( "WaterMarkPercent" , WaterMarkPercent );
            dicts.Add( "WaterMarkCompute" , WaterMarkCompute );
            dicts.Add( "WaterMarkThumbPercent" , WaterMarkThumbPercent );
            dicts.Add( "Transparence" , Transparence );
            dicts.Add( "WaterMarkImagePosition" , WaterMarkImagePosition );
            dicts.Add( "WaterMarkImagePositionX" , WaterMarkImagePositionX );
            dicts.Add( "WaterMarkImagePositionY" , WaterMarkImagePositionY );

            return BaseConfig.SetConfigForBatch( BaseConfig.eConfigs.Thumbnail , dicts );
        }
        #endregion
    }
}
